package com.idroid.domain;

public class States {

	public static enum StateAbbreviations {
		AL, AK, AS, AZ, AR, CA, CO, CT, DE, DC, FM, FL, GA, GU, HI, ID, IL, IN, IA, KS, KY, LA, ME, MH, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, MP, OH, OK, OR, PW, PA, PR, RI, SC, SD, TN, TX, UT, VT, VI, VA, WA, WV, WI, WY
	}

	public static String GetState(StateAbbreviations state) {
		switch (state) {
		case AL:
			return "ALABAMA";

		case AK:
			return "ALASKA";

		case AS:
			return "AMERICAN SAMOA";

		case AZ:
			return "ARIZONA";

		case AR:
			return "ARKANSAS";

		case CA:
			return "CALIFORNIA";

		case CO:
			return "COLORADO";

		case CT:
			return "CONNECTICUT";

		case DE:
			return "DELAWARE";

		case DC:
			return "DISTRICT OF COLUMBIA";

		case FM:
			return "FEDERATED STATES OF MICRONESIA";

		case FL:
			return "FLORIDA";

		case GA:
			return "GEORGIA";

		case GU:
			return "GUAM";

		case HI:
			return "HAWAII";

		case ID:
			return "IDAHO";

		case IL:
			return "ILLINOIS";

		case IN:
			return "INDIANA";

		case IA:
			return "IOWA";

		case KS:
			return "KANSAS";

		case KY:
			return "KENTUCKY";

		case LA:
			return "LOUISIANA";

		case ME:
			return "MAINE";

		case MH:
			return "MARSHALL ISLANDS";

		case MD:
			return "MARYLAND";

		case MA:
			return "MASSACHUSETTS";

		case MI:
			return "MICHIGAN";

		case MN:
			return "MINNESOTA";

		case MS:
			return "MISSISSIPPI";

		case MO:
			return "MISSOURI";

		case MT:
			return "MONTANA";

		case NE:
			return "NEBRASKA";

		case NV:
			return "NEVADA";

		case NH:
			return "NEW HAMPSHIRE";

		case NJ:
			return "NEW JERSEY";

		case NM:
			return "NEW MEXICO";

		case NY:
			return "NEW YORK";

		case NC:
			return "NORTH CAROLINA";

		case ND:
			return "NORTH DAKOTA";

		case MP:
			return "NORTHERN MARIANA ISLANDS";

		case OH:
			return "OHIO";

		case OK:
			return "OKLAHOMA";

		case OR:
			return "OREGON";

		case PW:
			return "PALAU";

		case PA:
			return "PENNSYLVANIA";

		case PR:
			return "PUERTO RICO";

		case RI:
			return "RHODE ISLAND";

		case SC:
			return "SOUTH CAROLINA";

		case SD:
			return "SOUTH DAKOTA";

		case TN:
			return "TENNESSEE";

		case TX:
			return "TEXAS";

		case UT:
			return "UTAH";

		case VT:
			return "VERMONT";

		case VI:
			return "VIRGIN ISLANDS";

		case VA:
			return "VIRGINIA";

		case WA:
			return "WASHINGTON";

		case WV:
			return "WEST VIRGINIA";

		case WI:
			return "WISCONSIN";

		case WY:
			return "WYOMING";
		}
		return "";

	}

	public static StateAbbreviations GetStateByName(String name) {
		if (name.toUpperCase().equals("ALABAMA"))
			return StateAbbreviations.AL;

		else if (name.toUpperCase().equals("ALASKA"))
			return StateAbbreviations.AK;

		else if (name.toUpperCase().equals("AMERICAN SAMOA"))
			return StateAbbreviations.AS;

		else if (name.toUpperCase().equals("ARIZONA"))
			return StateAbbreviations.AZ;

		else if (name.toUpperCase().equals("ARKANSAS"))
			return StateAbbreviations.AR;

		else if (name.toUpperCase().equals("CALIFORNIA"))
			return StateAbbreviations.CA;

		else if (name.toUpperCase().equals("COLORADO"))
			return StateAbbreviations.CO;

		else if (name.toUpperCase().equals("CONNECTICUT"))
			return StateAbbreviations.CT;

		else if (name.toUpperCase().equals("DELAWARE"))
			return StateAbbreviations.DE;

		else if (name.toUpperCase().equals("DISTRICT OF COLUMBIA"))
			return StateAbbreviations.DC;

		else if (name.toUpperCase().equals("FEDERATED STATES OF MICRONESIA"))
			return StateAbbreviations.FM;

		else if (name.toUpperCase().equals("FLORIDA"))
			return StateAbbreviations.FL;

		else if (name.toUpperCase().equals("GEORGIA"))
			return StateAbbreviations.GA;

		else if (name.toUpperCase().equals("GUAM"))
			return StateAbbreviations.GU;

		else if (name.toUpperCase().equals("HAWAII"))
			return StateAbbreviations.HI;

		else if (name.toUpperCase().equals("IDAHO"))
			return StateAbbreviations.ID;

		else if (name.toUpperCase().equals("ILLINOIS"))
			return StateAbbreviations.IL;

		else if (name.toUpperCase().equals("INDIANA"))
			return StateAbbreviations.IN;

		else if (name.toUpperCase().equals("IOWA"))
			return StateAbbreviations.IA;

		else if (name.toUpperCase().equals("KANSAS"))
			return StateAbbreviations.KS;

		else if (name.toUpperCase().equals("KENTUCKY"))
			return StateAbbreviations.KY;

		else if (name.toUpperCase().equals("LOUISIANA"))
			return StateAbbreviations.LA;

		else if (name.toUpperCase().equals("MAINE"))
			return StateAbbreviations.ME;

		else if (name.toUpperCase().equals("MARSHALL ISLANDS"))
			return StateAbbreviations.MH;

		else if (name.toUpperCase().equals("MARYLAND"))
			return StateAbbreviations.MD;

		else if (name.toUpperCase().equals("MASSACHUSETTS"))
			return StateAbbreviations.MA;

		else if (name.toUpperCase().equals("MICHIGAN"))
			return StateAbbreviations.MI;

		else if (name.toUpperCase().equals("MINNESOTA"))
			return StateAbbreviations.MN;

		else if (name.toUpperCase().equals("MISSISSIPPI"))
			return StateAbbreviations.MS;

		else if (name.toUpperCase().equals("MISSOURI"))
			return StateAbbreviations.MO;

		else if (name.toUpperCase().equals("MONTANA"))
			return StateAbbreviations.MT;

		else if (name.toUpperCase().equals("NEBRASKA"))
			return StateAbbreviations.NE;

		else if (name.toUpperCase().equals("NEVADA"))
			return StateAbbreviations.NV;

		else if (name.toUpperCase().equals("NEW HAMPSHIRE"))
			return StateAbbreviations.NH;

		else if (name.toUpperCase().equals("NEW JERSEY"))
			return StateAbbreviations.NJ;

		else if (name.toUpperCase().equals("NEW MEXICO"))
			return StateAbbreviations.NM;

		else if (name.toUpperCase().equals("NEW YORK"))
			return StateAbbreviations.NY;

		else if (name.toUpperCase().equals("NORTH CAROLINA"))
			return StateAbbreviations.NC;

		else if (name.toUpperCase().equals("NORTH DAKOTA"))
			return StateAbbreviations.ND;

		else if (name.toUpperCase().equals("NORTHERN MARIANA ISLANDS"))
			return StateAbbreviations.MP;

		else if (name.toUpperCase().equals("OHIO"))
			return StateAbbreviations.OH;

		else if (name.toUpperCase().equals("OKLAHOMA"))
			return StateAbbreviations.OK;

		else if (name.toUpperCase().equals("OREGON"))
			return StateAbbreviations.OR;

		else if (name.toUpperCase().equals("PALAU"))
			return StateAbbreviations.PW;

		else if (name.toUpperCase().equals("PENNSYLVANIA"))
			return StateAbbreviations.PA;

		else if (name.toUpperCase().equals("PUERTO RICO"))
			return StateAbbreviations.PR;

		else if (name.toUpperCase().equals("RHODE ISLAND"))
			return StateAbbreviations.RI;

		else if (name.toUpperCase().equals("SOUTH CAROLINA"))
			return StateAbbreviations.SC;

		else if (name.toUpperCase().equals("SOUTH DAKOTA"))
			return StateAbbreviations.SD;

		else if (name.toUpperCase().equals("TENNESSEE"))
			return StateAbbreviations.TN;

		else if (name.toUpperCase().equals("TEXAS"))
			return StateAbbreviations.TX;

		else if (name.toUpperCase().equals("UTAH"))
			return StateAbbreviations.UT;

		else if (name.toUpperCase().equals("VERMONT"))
			return StateAbbreviations.VT;

		else if (name.toUpperCase().equals("VIRGIN ISLANDS"))
			return StateAbbreviations.VI;

		else if (name.toUpperCase().equals("VIRGINIA"))
			return StateAbbreviations.VA;

		else if (name.toUpperCase().equals("WASHINGTON"))
			return StateAbbreviations.WA;

		else if (name.toUpperCase().equals("WEST VIRGINIA"))
			return StateAbbreviations.WV;

		else if (name.toUpperCase().equals("WISCONSIN"))
			return StateAbbreviations.WI;

		else if (name.toUpperCase().equals("WYOMING"))
			return StateAbbreviations.WY;

		return StateAbbreviations.MN;
	}

}